package com.garen.fire.dao.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.PostConstruct;

import org.springframework.stereotype.Repository;

import com.garen.common.BaseDao;
import com.garen.fire.dao.IFireCasePhotoDao;
import com.garen.fire.entity.FireCaseInfo;
import com.garen.fire.entity.FireCasePhoto;
import com.garen.utils.MapBuilder;


@Repository
public class FireCasePhotoDaoImpl extends BaseDao<FireCasePhoto> implements IFireCasePhotoDao {

	
	@PostConstruct
	private void init(){
		initOrm(FireCasePhoto.class);
	}
	

	@Override
	public List<FireCasePhoto> getCasePhotoListByAjbh(String ajbh) {
		// TODO Auto-generated method stub
		String sql = "select * from fire_case_photo p where p.fire_ajbh = :ajbh";
		
		Map<String,Object> paramMap = new MapBuilder()
				 .put("ajbh", ajbh)
				 .build();
		return getListBySQL(sql, paramMap);
	}

}
